---划出血玫瑰路径
---@class SkillEffect272101:BaseSkillEffect
SkillEffect272101 = ClientFight.CreateClass("SkillEffect272101",ClientFight.BaseSkillEffect)
local t = SkillEffect272101

---@param skill FightUsingSkill
---@param position Vector2
function t:prepareSkill(skill,position)
    local fight = skill.fight
    local fighter = skill.fighter
    local target = skill.target
    local skillBean = skill.skill.skillBean

    local startPos = Vector2(skillBean.f_SkillScriptParameter[1],
            skillBean.f_SkillScriptParameter[2]);
    local targetPos = Vector2(skillBean.f_SkillScriptParameter[3],
            skillBean.f_SkillScriptParameter[4]);

    -- 设置技能形状
    skill.skillShape = Rectangle2.New(skillBean.f_SkillShape);
    -- 前摇阶段
    skill.stage = FightSkillStageEnum.PREPARE
    skill.separate = true
    -- 指向左或右方向
    skill.targetDirection = FighterUtils.leftOrRight1(fighter, target)
    skill.position = startPos
    skill.targetPosition = targetPos

    local prepareTime = 0; --skill.skill.skillBean.f_PrepareTime
    local speed = skill.speed
    -- 计算攻击前摇帧数
    local frame = math.ceil(prepareTime * speed / Global.FIGHT_FRAME);
    SkillRoleMgr.savePathFile( "[" .. fight.frame .. "][SKILL]" .. fighter.fighterId .. "对" .. target.fighterId
    .. "攻击，使用技能" .. skillBean.f_SkillID .. "前摇阶段在" .. frame .. "帧后结束");
    if (frame > 0) then
        skill.stageFinishFrame = frame
    else
        SkillManager.releaseSkill(skill);
    end
    return true;
end
t.New()